home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- DOCUMENTATION FOR THE CURVEFIT PROGRAM (Documentation File Updated 05/09/92)
- ───────────────────────────────────────────────────────────────────────────
-
- Introduction:
- ╔═══════════╦══════════════════════════════════════════════════════╦══════════╗
- ║ CURVEFIT ║ Version 2.25a MAY 09, 1992 by Thomas S. Cox ║SHAREWARE ║
- ╠═══════════╩══════════════════════════════════════════════════════╩══════════╣
- ║ PURPOSE This program performs a least squares curve fit on X, Y data. ║
- ║ Curves for 25 equations are fitted. Equation coefficients, ║
- ║ Correlation Coefficient, and Best Fit are computed. For any ║
- ║ of the 25 equations, predictions for Y can be calculated. ║
- ║ ║
- ║ REFERENCE CURVE FITTING FOR PROGRAMMABLE CALCULATORS by William M. Kolb ║
- ║ Publisher: IMTEC P. O. Box 1402 Bowie MD 20716 (Out of Print)║
- ║ ║
- ║ WARNING A LINEARIZING technique is applied to various equations so that║
- ║ and the resulting equations are of the general form: Y=A+B*X ║
- ║ DISCLAIMER This means that sum of squares of errors in Y are not minimized,║
- ║ but the sum of squares of the linearized variable are minimized.║
- ║ ║
- ║ The Linear, Parabolic, Cubic and Hyperbolic equations are linear║
- ║ in the parameters so this reservation does not apply to those ║
- ║ curves. Reservation applies to equations with LN, EXP or POWERS.║
- ║ ║
- ║ SHAREWARE If you use and like this program a donation of $10 is requested.║
- ╠═════════════════════════════════════════════════════════════════════════════╣
- ║ PROGRAM Compiled using POWER BASIC Version 2.10a by Spectra Publishing ║
- ║ ASCII source file is also supplied. ║
- ║ ║
- ║ ACCURACY: Extended precision routines are used to insure ║
- ║ accuracy. No exponentiation routines are used. ║
- ║ ║
- ║ COMMENTS: IBM line graphics characters are used in this program. ║
- ║ ║
- ║ This implementation supports positive, negative and ║
- ║ zero values for X and Y. 999 points are permitted. ║
- ║ ║
- ║ This program uses the LOCATE command extensively for ║
- ║ improved ease of data entry and data changes. Printer ║
- ║ may be used with this program, but is not required. ║
- ║ ║
- ║ For equation 9, R squared is not computed. ║
- ║ No formula was given in the reference source. ║
- ║ ║
- ║ This program will automatically DELETE any blank or ║
- ║ null lines that are created at the top of a ║
- ║ LOTUS 1-2-3 .PRN file. ║
- ║ ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
-
-
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 1
-
-
-
-
-
-
-
-
-
-
-
-
- Main Program Menu:
- ╔═══════════╦══════════════════════════════════════════════════════╦══════════╗
- ║ CURVEFIT ║ Version 2.25a MAY 09, 1992 by Thomas S. Cox ║SHAREWARE ║
- ╠═══════════╩══════════╤═══════════════════════════════════════════╩══════════╣
- ║ POWER BASIC VERS 2.1A│ M A S T E R M E N U ║
- ╠═══════════╦══════════╪══════════════════════════════════════════════════════╣
- ║ SELECT ║ CHOICES │ BRIEF DESCRIPTION OF CHOICES ║
- ╠═══════════╬══════════╪══════════════════════════════════════════════════════╣
- ║ F1[ ]║ KEYBD DAT│ New Data (X and Y values) Entered from Keyboard ║
- ║ F2[ ]║ DISK DATA│ Load From Disk a Previously Stored Data File ║
- ║ F3[ ]║ ADD DATA│ Add Additional X,Y Data to Data Already in Memory ║
- ║ F4[ ]║ DEL DATA│ or CHANGE Values of X and Y Currently in Memory ║
- ║ F5[ ]║ LIST DATA│ X and Y Values Currently in Memory ║
- ║ F6[ ]║ CALC COEF│ Equation Coefficients (A, B, C, and R^2) ║
- ║ F7[ ]║ RESIDUALS│ For Input Values of X, Y and Eq# (1-25) Show Residual║
- ║ F8[ ]║ VIEW EQTS│ LIST of EQUATIONS Fitted Using this Program ║
- ║ F9[ ]║ VIEW COEF│ Equation Coefficients (A, B, C, R^2) ║
- ║ F10[ ]║ PREDICT Y│ For any Equation, Enter Range of X to see Predicted Y║
- ║ SHFT F1[ ]║ SAVE DATA│ X and Y Data Points to a DISK FILE ║
- ║ SHFT F2[ ]║ SUM OF SQ│ Display or Print SUMS and SUMS of SQUARES for REGRESS║
- ║ SHFT F3[ ]║ BEST FIT│ Sorted by R² (Coefficients MUST have been calculated)║
- ║ SHFT F4[ ]║ COLR/MONO│ Select COLOR or MONOCHROME (Default is COLOR + HERC) ║
- ╠═══════════╩══════════╧══════════════════════════════════════════════════════╣
- ║ Use UP or DOWN Keys to Select, Press ENTER; or FUNCTION KEY. <ESC> to EXIT ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
- 1. KEYBD DATA Clears out any previously entered data to prepare
- for new data entry from Keyboard.
- 2. DISK DATA Load previously stored data from a disk file. Over-
- writes any existing data. May use a comma or space
- separated file, LOTUS or SuperCalc PRN files, or files
- created by CURVEFIT.
- 3. ADD DATA Add data to previously entered data. Once data are
- added, coefficients should be recalculated to reflect
- the effect of the additions. Removes <DEL> data before
- showing any data.
- 4. DEL DATA Delete or Change any data point. Coefficients should
- be recalculated to reflect the effect of any changes.
- Will show <DEL> data if <LIST DATA> or <ADD DATA> not
- already run.
- 5. LIST DATA Will show on screen or printer the current values of
- X and Y. Removes <DEL> data before showing any data.
- 6. CALC COEF Calculates the equation coefficients and value of R².
- 7. RESIDUALS For the entered X and Y values and Equation # (1-25).
- Calculates predicted Y and Residual.
- 8. VIEW EQTS Show on screen list of equations fitted using CURVEFIT.
- 9. VIEW COEF Show coefficients (A, B, C) and R².
- 10. PREDICT Y Input a range of X values and see calculated Y values.
- 11. SAVE DATA Stores current X and Y data points to a disk file.
- 12. SUM OF SQ Displays or Prints Sums and Sums of Squares
- 13. BEST FIT Shows equations sorted by value of R² for R²>0.10
- 14. COLR/MONO Choice of Color or Monochrome. Default is Color.
- If a color monitor is used, text is white on a blue.
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 2
-
-
-
-
-
-
-
-
-
-
-
-
- ╔═══════════════════════════════════════════════════════════════════════════╗
- ║ EQUATIONS FITTED USING THIS PROGRAM ║
- ╠════════════════════════════════════╦══════════════════════════════════════╣
- ║ 1. Y=A+B*X STR. LINE ║ 2. Y=B*X LINE THRU ORG. ║
- ║ 3. Y=1/(A+B*X) REC. STR LINE ║ 4. Y=A+B*X+C/X LIN AND RECIP. ║
- ║ 5. Y=A+B/X HYPERBOLA ║ 6. Y=X/(A*X+B) RECIP HYPERBOLA ║
- ║ 7. Y=A+B/X+C/X*X 2ND ORD HYP ║ 8. Y=A+B*X+C*X*X PARABOLA ║
- ║ 9. Y=A*X+B*X*X PAR AT ORIGIN ║ 10. Y=A*X^B POWER ║
- ║ 11. Y=A*B^X MOD. POWER ║ 12. Y=A*B^(1/X) ROOT ║
- ║ 13. Y=A*X^(B*X) SUPER GEOMET. ║ 14. Y=A*X^(B/X) MOD GEOMETRIC ║
- ║ 15. Y=A*e^(B*X) EXPONENTIAL ║ 16. Y=A*e^(B/X) MOD EXPONENTIAL ║
- ║ 17. Y=A+B*ln(X) LOGARITHMIC ║ 18. Y=1/(A+B*ln(X)) RECIP LOG ║
- ║ 19. Y=A*B^X*X^C HOERL FUNCTION ║ 20. Y=A*B^(1/X)*X^C MOD HOERL ║
- ║ 21. Y=A*e^(((X-B)^2/)/C) NORMAL ║ 22. Y=A*e^((ln(X)-B)^2/C) LOG NORMAL║
- ║ 23. Y=A*X^B*(1-X)^C BETA ║ 24. Y=A*(X/B)^C*e^(X/B) GAMMA ║
- ║ 25. Y=1/(A*(X+B)^2+C) CAUCHY ║ ║
- ╠════════════════════════════════════╩══════════════════════════════════════╣
- ║ NOTES: A. Values of X and Y may be positive, negative, or zero ║
- ║ B. Up to 999 values of X and Y can be used. ║
- ╠═══════════════════════════════════════════════════════════════════════════╣
- ║ Press <RETURN> to continue program execution ║
- ╚═══════════════════════════════════════════════════════════════════════════╝
- Note: Equations 19 and 24 and Equations 12 and 16 are essentially identical.
-
- BRIEF EXPLANATION OF EQUATIONS:
-
- 1. Straight Line Full Accuracy Least Squares
- 2. Straight Line through the Origin Full Accuracy Least Squares
- 3. Reciprocal of Straight Line Full Accuracy Least Squares
- 4. Combined Linear and Reciprocal Full Accuracy Least Squares
- 5. Hyperbola Full Accuracy Least Squares
- 6. Reciprocal of a Hyperbola Full Accuracy Least Squares
- 7. Second Order Hyperbola Full Accuracy Least Squares
- 8. Parabola Full Accuracy Least Squares
- 9. Parabola Through Origin Full Accuracy Least Squares
- 10. Power LINEARIZED
- 11. Modified Power LINEARIZED
- 12. Root (Modification of Modified Power) LINEARIZED
- 13. Super Geometric LINEARIZED
- 14. Modified Geometric LINEARIZED
- 15. Exponential LINEARIZED
- 16. Modified Exponential (Similar to Root) LINEARIZED
- 17. Logarithmic LINEARIZED
- 18. Reciprocal of Logarithmic LINEARIZED
- 19. Hoerl's Equation LINEARIZED
- 20. Modified Hoerl's Equation LINEARIZED
- 21. Normal Distribution (Gaussian) LINEARIZED
- 22. Log Normal LINEARIZED
- 23. Beta Distribution (0<X<1) LINEARIZED
- 24. Gamma Distribution LINEARIZED
- 25. Cauchy Distribution LINEARIZED
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 3
-
-
-
-
-
-
-
-
-
-
-
-
- LISTING OF SUMS AND SUMS OF SQUARES (DEFINITION)
-
- The array R() is used to hold these values. The contents are:
-
- R(16)=R(16)+X(I) Note: R(1) through R(15)
- R(17)=R(17)+X(I)*X(I) are not used by this
- R(18)=R(18)+Y(I) program.
- R(19)=R(19)+Y(I)*Y(I)
- R(20)=R(20)+X(I)*Y(I)
- R(21)=I
- R(22)=R(22)+(1/X(I))
- R(23)=R(23)+(1/(X(I)*X(I)))
- R(24)=R(24)+(1/(Y(I)))
- R(25)=R(25)+(1/(Y(I)*Y(I)))
- R(26)=R(26)+(1/(Y(I)*X(I)))
- R(27)=I
- R(28)=R(28)+LOG(X(I))
- R(29)=R(29)+(LOG(X(I)))^2
- R(30)=R(30)+(LOG(Y(I)))
- R(31)=R(31)+(LOG(Y(I)))^2
- R(32)=R(32)+(LOG(X(I)))*(LOG(Y(I)))
- R(33)=I
- R(34)=R(34)+(X(I)/Y(I))
- R(35)=R(35)+(Y(I)/X(I))
- R(36)=R(36)+(X(I)^2)*Y(I)
- R(37)=R(37)+(X(I)^2)/Y(I)
- R(38)=R(38)+(Y(I)/X(I)^2)
- R(39)=R(39)+X(I)*Y(I)^2
- R(40)=R(40)+X(I)^3
- R(41)=R(41)+1/(X(I)^3)
- R(42)=R(42)+Y(I)^3
- R(43)=R(43)+X(I)^4
- R(44)=R(44)+1/(X(I)^4)
- R(45)=R(45)+LOG(X(I))/X(I)
- R(46)=R(46)+X(I)*LOG(Y(I))
- R(47)=R(47)+LOG(Y(I))/X(I)
- R(48)=R(48)+X(I)*LOG(X(I))
- R(49)=R(49)+(X(I)*LOG(X(I)))^2
- R(50)=R(50)+X(I)*LOG(X(I))*LOG(Y(I))
- R(51)=R(51)+Y(I)*LOG(X(I))
- R(52)=R(52)+LOG(X(I))/Y(I)
- R(53)=R(53)+((LOG(X(I))/X(I)))^2
- R(54)=R(54)+X(I)^2*LOG(Y(I))
- R(55)=R(55)+(LOG(X(I)))^3
- R(56)=R(56)+(LOG(X(I)))^4
- R(57)=R(57)+(LOG(X(I))^2)*LOG(Y(I))
- R(58)=R(58)+(LOG(Y(I))*LOG(X(I)))/X(I)
- R(59)=R(59)+LOG(1-X(I))
- R(60)=R(60)+(LOG(1-X(I)))^2
- R(61)=R(61)+LOG(X(I))*LOG(1-X(I))
- R(62)=R(62)+LOG(Y(I))*LOG(1-X(I))
- R(63)=R(63)+(LOG(X(I)))/X(I)
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 4
-
-
-
-
-
-
-
-
-
-
-
-
- EXAMPLE DATA ENTRY SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.25a MAY 09, 1992 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA ENTRY SCREEN| Press <ESC> at X or Y entry to Terminate Data Entry ║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # 1 ║X VALUE║ ░░░░░░░░░░░ ║Y VALUE║ ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
- EXAMPLE DATA ADDITION SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.25a MAY 09, 1992 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA ADDITION| Press <ESC> for X or Y to Terminate Data Entry ║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 20.0000│ 1.2000│ │ │ │ │ │ ║
- ║ 2│ 40.0000│ 2.0000│ │ │ │ │ │ ║
- ║ 3│ 60.0000│ 2.8000│ │ │ │ │ │ ║
- ║ 4│ 70.0000│ 3.2000│ │ │ │ │ │ ║
- ║ 5│ 80.0000│ 3.6000│ │ │ │ │ │ ║
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # 6║X VALUE║ ░░░░░░░░░░░ ║Y VALUE║ ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 5
-
-
-
-
-
-
-
-
-
-
-
-
- EXAMPLE DATA CORRECTION SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.25a MAY 09, 1992 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA CORRECTION| <ESC> for Data # to Exit, 'D' or 'd' for X or Y to Delete ║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 20 │ 1.2│ │ │ │ │ │ ║
- ║ 2│ 40 │ 2│ │ │ │ │ │ ║
- ║ 3│ 60 │ 2.8│ │ │ │ │ │ ║
- ║ 4│ 70 │ 3.2│ │ │ │ │ │ ║
- ║ 5│ 80 │ 3.6│ │ │ │ │ │ ║
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # ░░░░░ ║X VALUE║ ║Y VALUE║ ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
- EXAMPLE DATA LISTING SCREEN
- ╔═══════════╤══════════════════════════════════════════════════════╤══════════╗
- ║ CURVEFIT │ DATA LIST OF X AND Y VALUES NOW IN MEMORY │VERS 2.25a║
- ╟───┬───────┴──┬──────────┬───┬──────────┬──────────┬───┬──────────┼──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 20.0000│ 1.2000│ │ │ │ │ │ ║
- ║ 2│ 40.0000│ 2.0000│ │ │ │ │ │ ║
- ║ 3│ 60.0000│ 2.8000│ │ │ │ │ │ ║
- ║ 4│ 70.0000│ 3.2000│ │ │ │ │ │ ║
- ║ 5│ 80.0000│ 3.6000│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╚═══╧══════════╧══════════╧═══╧══════════╧══════════╧═══╧══════════╧══════════╝
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 6
-
-
-
-
-
-
-
-
-
-
-
-
- EXAMPLE CALCULATE AND REVIEW COEFFICIENTS SCREEN
- ╔═══════════╦════════════════════════════════════╦════════════════════════════╗
- ║ CURVEFIT ║ LISTING OF CALCULATED COEFFICIENTS ║ BEST FIT EQUATION IS # 1 ║
- ╠════╤══════╩═════╤════════════╤════════════╤════╩═╤══════╤═══════════════════╣
- ║EQ #│ 'A' COEF. │ 'B' COEF. │ 'C' COEF. │ R² │R² COR│ EQUATION OF CURVE ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║ 1 │ 0.4000│ 0.0400│ 0.0000│1.0000│1.0000│Y=A+B*X ║
- ║ 2 │ 0.0000│ 0.0464│ 0.0000│0.9704│0.9704│Y=B*X ║
- ║ 3 │ 0.9442│ -0.0090│ 0.0000│0.9180│0.8906│Y=1/(A+B*X) ║
- ║ 4 │ 0.0000│ 0.0000│ 0.0000│0.0000│0.0000│Y=A+B*X+C/X ║
- ║ 5 │ 3.9429│ -58.3720│ 0.0000│0.8784│0.8378│Y=A+B/X ║
- ║ 6 │ 0.1090│ 14.6548│ 0.0000│0.9955│0.9940│Y=X/(A*X+B) ║
- ║ 7 │ 5.8651│ -220.1911│ 2539.5892│0.9939│0.9879│Y=A+B/X+C/X*X ║
- ║ 8 │ 0.0000│ 0.0000│ 0.0000│0.0000│0.0000│Y=A+B*X+C*X*X ║
- ║ 9 │ 0.0574│ -0.0002│ 0.0000│0.0000│0.0000│Y=A*X+B*X*X ║
- ║ 10 │ 0.1107│ 0.7910│ 0.0000│0.9986│0.9982│Y=A*X^B ║
- ║ 11 │ 0.8939│ 1.0184│ 0.0000│0.9780│0.9707│Y=A*B^X ║
- ║ 12 │ 4.6336│ 6.86307E-13│ 0.0000│0.9569│0.9425│Y=A*B^(1/X) ║
- ║ 13 │ 1.0505│ 0.0037│ 0.0000│0.9658│0.9544│Y=A*X^(B*X) ║
- ║ 14 │ 6.2337│ -11.2767│ 0.0000│0.9782│0.9710│Y=A*X^(B/X) ║
- ║ 15 │ 0.8939│ 0.0182│ 0.0000│0.9780│0.9707│Y=A*e^(B*X) ║
- ║ 16 │ 4.6336│ -28.0075│ 0.0000│0.9569│0.9425│Y=A*e^(B/X) ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║BEST│ 0.4000│ 0.0400│ 0.0000│1.0000│1.0000│Y=A+B*X ║
- ╚════╧════════════╧════════════╧════════════╧══════╧══════╧═══════════════════╝
-
- EXAMPLE DATA PREDICTION SCREEN VERSION 2.25a
- ╔═══════════╦═════════════╤═════╤══════╤════════════════════════════╦═════════╗
- ║ CURVEFIT ║ PREDICTIONS │ EQ# │ 1 │Y=A+B*X ║VER 2.25a║
- ╠═══════╤═══╩═════════════╪═════╧╤═════╧═══════════╤══════╤═════════╩═════════╣
- ║ START │ 10 │ STOP │ 100 │ STEP │ 2 ║
- ╟───────┴────┬────────────┼──────┴─────┬───────────┴┬─────┴──────┬────────────╢
- ║X-DATA ENTRY│PREDICTED Y │X-DATA ENTRY│PREDICTED Y │X-DATA ENTRY│PREDICTED Y ║
- ╟────────────┼────────────┼────────────┼────────────┼────────────┼────────────╢
- ║ 10.0000│ 0.8000│ 38.0000│ 1.9200│ 66.0000│ 3.0400║
- ║ 12.0000│ 0.8800│ 40.0000│ 2.0000│ 68.0000│ 3.1200║
- ║ 14.0000│ 0.9600│ 42.0000│ 2.0800│ 70.0000│ 3.2000║
- ║ 16.0000│ 1.0400│ 44.0000│ 2.1600│ 72.0000│ 3.2800║
- ║ 18.0000│ 1.1200│ 46.0000│ 2.2400│ 74.0000│ 3.3600║
- ║ 20.0000│ 1.2000│ 48.0000│ 2.3200│ 76.0000│ 3.4400║
- ║ 22.0000│ 1.2800│ 50.0000│ 2.4000│ 78.0000│ 3.5200║
- ║ 24.0000│ 1.3600│ 52.0000│ 2.4800│ 80.0000│ 3.6000║
- ║ 26.0000│ 1.4400│ 54.0000│ 2.5600│ 82.0000│ 3.6800║
- ║ 28.0000│ 1.5200│ 56.0000│ 2.6400│ 84.0000│ 3.7600║
- ║ 30.0000│ 1.6000│ 58.0000│ 2.7200│ 86.0000│ 3.8400║
- ║ 32.0000│ 1.6800│ 60.0000│ 2.8000│ 88.0000│ 3.9200║
- ║ 34.0000│ 1.7600│ 62.0000│ 2.8800│ 90.0000│ 4.0000║
- ║ 36.0000│ 1.8400│ 64.0000│ 2.9600│ 92.0000│ 4.0800║
- ╟────────────┴───┬────────┴───────┬────┴───────────┬┴────────────┴──┬─────────╢
- ║ Coefficients │A= 0.4000 │B= 0.0400 │C= 0.0000 │R²=1.0000║
- ╚════════════════╧════════════════╧════════════════╧════════════════╧═════════╝
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 7
-
-
-
-
-
-
-
-
-
-
-
-
- Example of BEST FIT Screen
- ╔═══════════╦═══════════════════════════════════════════════════╦═════════════╗
- ║ CURVEFIT ║ SORTED LISTING OF EQUATIONS for CORRECTED R² >0.10║VERSION 2.25a║
- ╠════╤══════╩═════╤════════════╤════════════╤══════╤══════╤═════╩═════════════╣
- ║EQ #│ 'A' COEF. │ 'B' COEF. │ 'C' COEF. │ R² │R² COR│ EQUATION OF CURVE ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║ 1 │ 0.4000│ 0.0400│ 0.0000│1.0000│1.0000│Y=A+B*X ║
- ║ 20 │ 0.0497│ 487.5355│ 0.9595│1.0000│1.0000│Y=A*B^(1/X)*X^C ║
- ║ 22 │ 0.2736│ -1.3288│ 12.6516│1.0000│1.0000│Y=A*e^((lnX-B)^2/C)║
- ║ 24 │ 5.8841│ 273.3730│ 0.6362│1.0000│0.9999│Y=A*(X/B)^C*e^(x/b)║
- ║ 19 │ 0.1657│ 1.0037│ 0.6362│1.0000│0.9999│Y=A*B^X*X^C ║
- ║ 21 │ 3.9850│ 106.1905│ -6217.7704│0.9994│0.9987│Y=A*e^(((X-B)^2)/C)║
- ║ 10 │ 0.1107│ 0.7910│ 0.0000│0.9986│0.9982│Y=A*X^B ║
- ║ 6 │ 0.1090│ 14.6548│ 0.0000│0.9955│0.9940│Y=X/(A*X+B) ║
- ║ 25 │ 0.0002│ -78.4589│ 0.2895│0.9951│0.9902│Y=1/(A*(X+B)^2+C) ║
- ║ 7 │ 5.8651│ -220.1911│ 2539.5892│0.9939│0.9879│Y=A+B/X+C/X*X ║
- ║ 18 │ 2.0236│ -0.4038│ 0.0000│0.9889│0.9852│Y=1/(A+B*lnX) ║
- ║ 14 │ 6.2337│ -11.2767│ 0.0000│0.9782│0.9710│Y=A*X^(B/X) ║
- ║ 15 │ 0.8939│ 0.0182│ 0.0000│0.9780│0.9707│Y=A*e^(B*X) ║
- ║ 11 │ 0.8939│ 1.0184│ 0.0000│0.9780│0.9707│Y=A*B^X ║
- ║ 2 │ 0.0000│ 0.0464│ 0.0000│0.9704│0.9704│Y=B*X ║
- ║ 17 │ -4.0091│ 1.6922│ 0.0000│0.9660│0.9547│Y=A+B*lnX ║
- ║ 13 │ 1.0505│ 0.0037│ 0.0000│0.9658│0.9544│Y=A*X^(B*X) ║
- ║ 16 │ 4.6336│ -28.0075│ 0.0000│0.9569│0.9425│Y=A*e^(B/X) ║
- ╚════╧════════════╧════════════╧════════════╧══════╧══════╧═══════════════════╝
-
- Example RESIDUAL Calculation Screen
- ╔═══════════╦═════════════╤═════╤══════╤════════════════════════════╤═════════╗
- ║ CURVEFIT ║ RESIDUALS │ EQ# │ 1 ▒▒▒│BEST Y=A+B*X │VER 2.25a║
- ╠═══════════╩╤════════════╪═════╧══════╪═════════════╤═════════════╤╧═════════╣
- ║X-DATA ENTRY│Y-DATA ENTRY│CALCULATED Y│RESIDUAL VAL │CSUM ABS(RES)│ POINT # ║
- ╟────────────┼────────────┼────────────┼─────────────┼─────────────┼──────────╢
- ║ 20.0000│ 1.2000│ 1.2000│ 1.11022E-15 │ 1.11022E-15 │ 1 ║
- ║ 40.0000│ 2.0000│ 2.0000│ 6.66134E-16 │ 1.77636E-15 │ 2 ║
- ║ 60.0000│ 2.8000│ 2.8000│ 0.0000 │ 1.77636E-15 │ 3 ║
- ║ 70.0000│ 3.2000│ 3.2000│ 0.0000 │ 1.77636E-15 │ 4 ║
- ║ 80.0000│ 3.6000│ 3.6000│ 0.0000 │ 1.77636E-15 │ 5 ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ║ │ │ │ │ │ ║
- ╟────────────┴───┬────────┴───────┬────┴───────────┬─┴─────────────┴┬─────────╢
- ║ Coefficients │A= 0.4000 │B= 0.0400 │C= 0.0000 │R²=1.0000║
- ╚════════════════╧════════════════╧════════════════╧════════════════╧═════════╝
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 8
-
-
-
-
-
-
-
-
-
-
-
-
- MISCELLANEOUS NOTES:
-
-
- 1. LISTING DATA Will show 54 data points per screen. To view
- next 54 data points, press <ENTER>. <ESC> to Exit.
-
- 2. ADD DATA When reading data into screen array, program
- will show all data in sets of 42 points per screen.
- Press <ENTER> to advance. Prompt for PT# will be
- for one data point higher than currently existing
- number of data points. Entering <ESC> for X or Y
- will terminate additions.
-
- 3. DELETE DATA Screen will look similar to ADDITION screen.
-
- IMPORTANT NOTE: If 'S' is stored as a DATAPOINT,
- that point will be last one
- recognized, even if there is more
- valid data. Always exit from
- this routine by entering <ESC> for any
- data point number.
-
-
- To change data, just enter point number and the new
- values for X and Y.
-
-
- 4. DATA FILES Program will read a file that has blank lines in it such
- WITH BLANK as might be created with a word-processing program.
- LINES CURVEFIT will insert 'DEL' at the appropriate places and
- delete them at the time of listing data or calculating
- equation coefficients. Data file will automatically be
- condensed to fill slots occupied by 'DEL'.
-
- 5. COMPILED VS The program is now too large to use with Interpreter or
- INTERPRETER QBASIC.
-
-
-
-
-
-
- 6. MONITOR Program is known to work satisfactorily with Hercules
- compatible video cards, CGA cards, EGA cards, and VGA.
- MONOCHROME option from program is needed for some video
- cards. With color monitors, color is high intensity white
- on blue.
-
- 7. COMPILER Set all options except 8087 required.
- OPTIONS
-
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 8. OPTION If the cursor keys are used to select options, it doesn't
- SELECTION matter whether or not the NUMBER-LOCK function is active
- WITH CURSOR since the program will also use 8 for the up arrow and 2
- KEYS for the down arrow.
-
- 9. MEANING OF This occurs particularly for equation #2 as there was no
- R^2 = ZERO listing in the source material of a formula for this
- value. It is listed as zero to indicate that value was
- not calculated.
-
- 10. MEANING OF Some equations do not use C. For those equations, C is
- C = ZERO listed as zero.
-
- 11. MEANING OF For some data sets a number of the 25 equations used in
- A, B, and C this program are not usable. In those cases, values
- = ZERO of A, B, and C are all set to zero.
-
- 12. NUMBER OF This program will handle up to 999 data points.
- DATA POINTS
-
- 13. DATA DISPLAY ENTER DATA routine shows numbers with as much precision as
- possible. Depending on magnitude of data, it will be
- displayed using one of the following formats
- #####.####, #######.##, ##########, or ##.##^^^^
-
- LIST DATA and ADD DATA format is the same as for ENTER DATA
-
- DELETE or CORRECT routine shows the 10 left-most digits of
- number. This is particularly useful for looking at small
- numbers such as 0.002345, etc. Note that using the DELETE
- or CORRECT routine to look at data does not necessarily
- require one to delete or correct data. Data are right
- justified within the 10 character limitation. This the only
- routine that does not automatically screen out <DEL> values
-
-
- 14. COEFFICIENT This routine shows data either in the #######.#### or
- LISTING ##.#####^^^^ format depending on the number to be
- displayed. In any case, up to 12 spaces will be allowed
- for this number.
-
- 15. PREDICTION Same format for data display as for COEFFICIENT LISTING.
-
- 16. DATA LISTING No specific formatting routine is used so that all digits
- TO PRINTER are output.
-
-
-
-
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 11
-
-
-
-
-
-
-
-
-
-
-
-
- 17. TRACKING DATA To aid in keeping track of where data will be entered a
- ENTRY ON block of ░░░░░░░░░░░░░░ will mark the place.
- SCREEN
- The last X and Y values entered will still be displayed
- at the bottom of the screen. For example, for entering
- data point #2, the value of Y1 will still be displayed as
- the Y entry. Important Note: It is not possible to enter
- a series of data points that are the same value as the
- previous entry by pressing ENTER. For the X-Data only, it
- it is possible to increment by the difference between the
- last two data entries for X by just pressing <ENTER>. All
- Y-Data must be entered individually.
-
- If data is entered using the DATA ENTER option and there
- are 'DEL' entries, these can be seen by calling up the
- DELETE routine. LIST Data routine automatically packs
- data and removes any DEL entries.
-
- 18. DATA FILE Data is stored as two columns of X and Y data such that
- STORAGE it may be read back into a program such as LOTUS, NWA
- FORMAT STATPAK, or the SHAREWARE program, CFIT.
-
- 19. DATA FILE Will read data in format used for Storage,
- FORMAT one column of data with alternating X and Y values,
- READABLE either of the above with leading blank lines or inter-
- spersed blank lines.
-
- 20. BEST FIT Based on the value of R^2 corrected to account for
- degrees of freedom. Sorted by decreasing value of R^2.
-
- 21. REFERENCE CURVE FITTING for PROGRAMMABLE CALCULATORS
- by William M. Kolb
- PUBLISHED by IMTEC P. O. Box 1402 Bowie, MD 20716
-
- This reference gives a full explanation of the equations
- used in this program and includes excellent graphs
- showing the shapes of curves described by these equations.
-
- A program specifically for the HP-41CV that fits 19 of the
- 25 equations of CURVEFIT is listed along with barcode for
- easy entry of program into HP-41. (Book is out of print.)
-
- 22. FILES CURVE225.BAS (ASCII Source File)
- SUPPLIED WITH CURVE225.EXE Executable file compiled using Spectra
- CURVEFIT Publishing's POWER BASIC 2.10a
- CURVEFIT.DOC This documentation file
- EX *.* Example Data Files
- DATA* .PRN More Example Data Files
- CF286225.EXE Compiled to use '286 and higher processors
- to best advantage. Won't run on 8088/8086
-
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 12
-
-
-
-
-
-
-
-
-
-
-
-
- SHAREWARE
- =========
- This program is SHAREWARE. That means that if you use it, a small donation
- of $10.00 is requested by the author.
-
- Program may be freely copied and distributed so long as there is no more than
- a $10.00 copying and handling charge. Also, the program should be distributed
- with no alterations to the files. The documentation files and example files
- must be included with program.
-
- Feel free to place this program on any bulletin board system.
-
-
-
- The author welcomes any comments and suggestions.
-
- The author is:
-
- Thomas S. Cox
- 102 Evergreen Street
- Easley, SC 29642
-
- -------------------------------------------------------------------------------
- LATE NOTES:
-
- There are two versions supplied: (1) CF286225 is optimized for 286 and higher
- processors. (2) CURVE225 works with 8088/8086/80286/80386/ and 80486, but
- is not as fast on '286 and higher machines as CF286225.
-
- The program LZE was used to compress the compiled .EXE files. Cuts file
- size by about 60 percent.
-
- The program is significantly less prone to crashing on troublesome data sets
- due to the increased precision allowed by the Extended Precision variables
- available in POWER BASIC. Speed is significantly enhanced on machines
- not having a math co-processor.
-
-
- Documentation File for CURVEFIT Version 2.25a 05/09/92 Page 13